<h3>Портфолио</h3>
<!-- Preview block:START -->
<div style="">
<div class="portfolioimagenav" >
<? $_cnt=0;foreach ($this->oPortFolioImages as $oPortfolioImage):$_cnt++?>
<? if ($oPortfolioImage->id==$this->oCurrImage->id):?>
<span class='navnum'><?=$_cnt?></span>
<? else:?>
<a class='navnum' 
 href="<?=ROOT_URL?>/firm/<?=NRequest::getVar('firm_id')?>/?portfolioitem=<?=$oPortfolioImage->id?>"><?=$_cnt?></a>
<? endif;?>
<? endforeach;?>
</div>
<div >
<? $_imgsize= getimagesize(ROOT_DIR."/uploads/com_portfolio/".$this->oCurrImage->image)

?>
<a onclick='window2=open("<?=ROOT_URL?>/uploads/com_portfolio/<?=$this->oCurrImage->image?>","",
   "scrollbars=no,width=<?=$_imgsize[0]?>, height=<?=$_imgsize[1]?>");return;'  href="#"><img style="height:<?=$this->oCurrImage->imagesize[1]?>px;width:<?=$this->oCurrImage->imagesize[0]?>px;border-left:5px #ce2469 solid;" id="tpl_<?=$this->oCurrImage->id?>" src="<?=ROOT_URL?>/uploads/com_portfolio/380x_<?=$this->oCurrImage->image?>" /></a>

<!--<script type="text/javascript">
      new TemplatePreview('tpl_<?=$this->oCurrImage->id?>', {
        title:  '<?=$this->oCurrImage->portfolio_title?>',
        src:    '<?=ROOT_URL?>/uploads/com_portfolio/<?=$this->oCurrImage->image?>',
        width:  640      });
</script>-->
<!--
<script type="text/javascript">
	current=$("tpl_<?=$this->oCurrImage->id?>");
	var largeSrc="<?=ROOT_URL?>/uploads/com_portfolio/<?=$this->oCurrImage->image?>";
      	current.setAttribute('largeSrc', largeSrc);
       	var tip = '<div class="tool"><h1><?=$this->oCurrImage->portfolio_title?></h1><div> <img src="' + largeSrc + '" /></div><div>';
        new Tooltip(current, tip, {'html': true, 'classname': 'myToolTipsObject'});
</script>
-->

</div>
<div style="margin-left:3px;height:40px; overflow:hidden; width:380px;">
<p><strong><?=$this->oCurrImage->portfolio_title?></strong></p>
<p><?=$this->oCurrImage->portfolio_shortbody?></p>
</div>
</div>
<!-- Preview block:END -->





<!-- All portfolio previews -->
<? $i=0;
foreach ($this->oPortfolios as $oPortfolio):
$filename=ROOT_URL."/uploads/com_portfolio/x90_".$oPortfolio->image;
$aImgSizeInfo =getimagesize($filename);?>
<? if ($oPortfolio->id==$this->oCurrImage->portfolio_id):?>
<img  src="<?=ROOT_URL?>/uploads/com_portfolio/x90_<?=$oPortfolio->image?>" />
<? else:?>
<a href="<?=ROOT_URL?>/firm/<?=$oPortfolio->firm_id?>/?portfolioitem=<?=$oPortfolio->default_image?>">
<img  src="<?=ROOT_URL?>/uploads/com_portfolio/x90_<?=$oPortfolio->image?>" />
</a>
<? endif;?>
<? endforeach;?>
